package com.a01_2021.thousandstimes.general.service;

import com.a01_2021.thousandstimes.exception.CustomException;
import com.a01_2021.thousandstimes.general.entity.SysRole;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author FRQ
 * @since 2021-02-22
 */
public interface SysRoleService extends IService<SysRole> {

    Map<String, Object> copy(long roleId, String roleName, String roleDes) throws CustomException;

    boolean isRole(String roleName);

    Map<String, Object> setMenuToRole(long roleId, Set<Long> setMenuList) throws CustomException;

    List<SysRole> getAllRole();

    void removeRoleById(long roleId) throws CustomException;

    boolean isRoleIdle(long roleId) throws CustomException;

    void forceRemoveRoleById(long roleId) throws CustomException;

    SysRole addRole(String roleName, String roleDec) throws CustomException;

    boolean isRole(Set<Long> roleSet);

    List<SysRole> getRole(long userId) throws CustomException;

    List<SysRole> getRoleByMenu(long menuId) throws CustomException;

    void dropByUserId(long userId);
}
